#!/bin/bash

if [ $# -lt 2 ]; then
	echo "Usage: bash collect.sh <group> <name>"
	exit 1
fi

suffix=$(cat extip | cut -d '.' -f3-4)
group=$1
name=$2

mkdir -p ~/log$suffix/$group/$name
cp ./log/* ~/log$suffix/$group/$name/
if [ -f blkstatistics ]; then
    cp ./blkstatistics ~/log$suffix/$group/$name/
fi